package com.cn.response;

/**
 * 功能描述: <br>
 *
 * @program: xg-prant
 * @description: ResultCode类
 * @author: Mr.TYJ
 * @create: 2022-03-02 17:46
 **/
public enum  ResultCode implements CustomizeResultCode {
    /* 成功 */
    SUCCESS(200, "成功"),

    /* 默认失败 */
    COMMON_FAIL(999, "失败"),

    /* 参数错误：1000～1999 */
    PARAM_NOT_VALID(1001, "参数无效"),
    PARAM_IS_BLANK(1002, "参数为空"),
    PARAM_TYPE_ERROR(1003, "参数类型错误"),
    PARAM_NOT_COMPLETE(1004, "参数缺失"),

    /* 用户错误 */
    USER_NOT_LOGIN(2001, "用户未登录"),
    USER_ACCOUNT_EXPIRED(2002, "账号已过期"),
    USER_CREDENTIALS_ERROR(2003, "密码错误"),
    USER_CREDENTIALS_EXPIRED(2004, "密码过期"),
    USER_ACCOUNT_DISABLE(2005, "账号不可用"),
    USER_ACCOUNT_LOCKED(2006, "账号被锁定"),
    USER_ACCOUNT_NOT_EXIST(2007, "账号不存在"),
    USER_ACCOUNT_ALREADY_EXIST(2008, "账号已存在"),
    USER_ACCOUNT_USE_BY_OTHERS(2009, "账号下线"),
    VERIFICATION_CODE_ERROR(2024, "验证码错误"),
    /*部门错误*/
    DEPARTMENT_NOT_EXIST(3007, "部门不存在"),
    DEPARTMENT_ALREADY_EXIST(3008, "部门已存在"),

    /* 业务错误 */
    NO_PERMISSION(3001, "没有权限"),

    /*运行时异常*/
    ARITHMETIC_EXCEPTION(9001,"算数异常"),
    /*空指针异常*/
    NULL_POINTER_EXCEPTION(9002,"空指针异常"),
   /*数组越界*/
    ARRAY_INDEX_OUT_BOUNDS_EXCEPTION(9003,"数组越界"),
    /*不知道的其它异常暂定服务器异常*/
    UNKNOWN_EXCEPTION(9999,"服务器异常，请稍后重试..."),
    /*建议修改的密码不能和原始密码相同*/
    PASSWORD_EQUAL_POINTER_EXCEPTION(2023,"建议修改的密码不能和原始密码相同"),
    /*判断账号是否是自己*/
    USER_ACCOUNT_NOT_ONESELF(2025,"账号不能是自己"),
    /*判断账号是否余额不足*/
    USER_ACCOUNT_NOT_SUFFICIENT_FUNDS(2025,"余额不足"),
    /*密码不相等*/
    PASSWORD_UNLIKENESS_NULL_POINTER_EXCEPTION(2022,"密码不相同,请重新输入！"),
    /*密码不相等*/
    ADV_NOT_ID(2028,"密码不相同,请重新输入！");

    ResultCode(Integer code,String message){
        this.code=code;
        this.message=message;

    }
    private Integer code;
    private String message;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
